using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace Shop
{
    /// <summary>
    /// generate by msg tool
    /// 玩家座位信息
    /// </summary>
	public class ItemInfo : Dto
	{
		//玩家id
		public int id;
		//砖石
		public int diamond;
		//价格
		public int price;

        public ItemInfo() { }

        public ItemInfo(int id, int diamond, int price)
        {
            this.id = id;
            this.diamond = diamond;
            this.price = price;
        }

        
		public void write(object obj)
		{
			ByteBuffer b = obj as ByteBuffer;
			b.PushInt(id);
			b.PushInt(diamond);
			b.PushInt(price);
			
		}

	    public void read(object obj)
		{
		    MyConverter b = obj as MyConverter;
			id = b.toInt32();
			diamond = b.toInt32();
			price = b.toInt32();
			
		}

	}
}